<?php
session_start();
require_once 'header.php';
$webroot="";
require_once 'html/sellerTemplate.php';
function __autoload($className)
	{
    	require_once('class/' . $className . '.class.php');
	}
session::need_seller();
$userId=session::getuserid();
$getAgent=user::findAgentByUserId($userId);
if(!empty($_GET["confirm"]))
{
	$ccIdUpdate=$_SESSION["ccIdDie"];
	$updateExport=database::Update("ccinfo",array(
	'ccid' => $ccIdUpdate
	),array(
	'is_export' => 'Y'
	));
	if($updateExport)
	{
		echo "done";
	}
}
else 
{
	
if($getAgent!='0')
{
	$getCcDie=database::LimitQuery("ccinfo",array(
	'select' => 'ccid,Firstname,Lastname,CCnumber,ExMonth,ExYear,CCV2,Address,City,State,Zip,Phone,Country',
	'condition' => array(
	'site' => $getAgent,
	'Status' => 'INVALID',
	'is_export' => 'N'
	),
	'order' =>'order by country desc'
	));
	require_once 'html/sellerExportCcDie.php';
}
else
{
	echo "you are not a seller";
}
}
?>